package com.murphy.mq.activemq.controller;

import com.murphy.mq.activemq.service.QueneProducer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/active")
public class ActiveMqController {

    private static final Logger logger = LoggerFactory.getLogger(ActiveMqController.class);

    @Autowired
    QueneProducer queneProducer;

    @RequestMapping("send")
    public void QueneProducer(){
        try {
            queneProducer.QueneProducer();
            System.out.println("消息上传mq成功");
            //return AresResult.build("0000","消息上传mq成功");
        }catch (Exception e){
            logger.error("消息上传mq失败");
            e.printStackTrace();
        }
        System.out.println("消息上传mq失败");
        //return AresResult.build("1111","消息上传mq失败");
    }

}
